[#macro tenantShowView]
<div class="model-form">
    <el-page-header @back="goBack" content="详情">
    </el-page-header>

    <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
        <el-menu-item index="1">
            租户详情
        </el-menu-item>
        <el-menu-item index="3">租户账单</el-menu-item>
        <el-menu-item index="4">资金记录</el-menu-item>
        <el-menu-item index="5">续费记录</el-menu-item>
        <el-menu-item index="6">功能列表</el-menu-item>
    </el-menu>
    <div style="margin-top: 15px;">
        <router-view></router-view>
    </div>

</div>
[/#macro]
[#macro tenantShowConfig]
<script type="text/x-template" id="my-tenant-show">
    [@tenantShowView /]
</script>
<script type="text/javascript">
    //显示组件开始
    var tenantShowConfig = {};
    tenantShowConfig.template = "#my-tenant-show";
    tenantShowConfig.methods = config.basicMethod();
    tenantShowConfig.data = function () {
        return {
            viewModel: {
            },
            activeIndex: "1"
        }
    };

    tenantShowConfig.methods.handleSelect = function (index) {
        console.log(index)
        var selectId = this.selectId;
        if (index == "1") {
            this.$router.replace({ path: '/view/index', query: { id: selectId, activeIndex: 1, time: Math.random() } })
        }
        else if (index == "2") {
            this.$router.replace({ path: '/staffs', query: { id: selectId, activeIndex: 2, time: Math.random() } })
        } else if (index == "6") {
            this.$router.replace({ path: '/menus', query: { id: selectId, activeIndex: 6, time: Math.random() } })
        } else {
            
        }
    };

    tenantShowConfig.mounted = function () {
        var id = this.$route.query.id;
        var activeIndex = this.$route.query.activeIndex;

        var self = this;
        var data = {};
        data.id = id;
        this.selectId = data.id;
        if (activeIndex) {
            this.activeIndex = activeIndex;
        }
    }
    var tenantShowView = Vue.component('my-tenant-view', tenantShowConfig);
		//显示组件结束
</script>
[/#macro]



[#macro childTenantView]
<div>
    <el-form class="viewForm" label-width="80px">
        <el-col :span="12">
            <el-form-item label="标识">
                <div v-html="viewModel.key">></div>
            </el-form-item>
        </el-col>
        <el-col :span="12">
            <el-form-item label="名称">
                <div v-html="viewModel.name">></div>
            </el-form-item>
        </el-col>
        <el-col :span="12">
            <el-form-item label="域名">
                <div v-html="viewModel.domain">></div>
            </el-form-item>
        </el-col>
        <el-col :span="12">
            <el-form-item label="logo">
                <div v-html="viewModel.logo">></div>
            </el-form-item>
        </el-col>
        <el-col :span="12">
            <el-form-item label="电话">
                <div v-html="viewModel.phone">></div>
            </el-form-item>
        </el-col>
        <el-col :span="12">
            <el-form-item label="地址">
                <div v-html="viewModel.address">></div>
            </el-form-item>
        </el-col>
        <el-col :span="12">
            <el-form-item label="theme">
                <div v-html="viewModel.theme">></div>
            </el-form-item>
        </el-col>
        <el-col :span="12">
            <el-form-item label="租户介绍">
                <div v-html="viewModel.note">></div>
            </el-form-item>
        </el-col>
        <el-col :span="12">
            <el-form-item label="类型">
                <div v-html="viewModel.catalog">></div>
            </el-form-item>
        </el-col>
        <el-col :span="12">
            <el-form-item label="开始日期">
                <div v-html="viewModel.beginDate">></div>
            </el-form-item>
        </el-col>
        <el-col :span="12">
            <el-form-item label="到期日期">
                <div v-html="viewModel.expireDate">></div>
            </el-form-item>
        </el-col>
    </el-form>
</div>
[/#macro]

[#macro childTenantConfig]
<script type="text/x-template" id="child-tenant-show">
        [@childTenantView /]
    </script>
<script type="text/javascript">

    var childTenantShowConfig = {};
    childTenantShowConfig.template = "#child-tenant-show";
    childTenantShowConfig.methods = config.basicMethod();
    childTenantShowConfig.data = function () {
        return {
            viewModel: {
            }
        }
    };
    childTenantShowConfig.mounted = function () {
        var id = this.$route.query.id;
        var self = this;
        var data = {};
        data.id = id;
        this.postData("${siteurl}tenantRest/tenant/view.htm", data, function (res) {
            if (res.code == 0) {
                self.viewModel = res;

            }
        });
    }
    var childTenantShowView = Vue.component('child-tenant-show', childTenantShowConfig);
</script>
[/#macro]